package cn.edu.neusoft.yuejian4.yuejian_4.model;

import java.util.List;

import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Club;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.ClubClass;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.ClubVideo;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Success;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Train;
import cn.edu.neusoft.yuejian4.yuejian_4.listener.List_TListener;
import cn.edu.neusoft.yuejian4.yuejian_4.listener.TListener;
import retrofit2.Call;

/**
 * Created by Lix on 2018/10/9.
 */

public class ClubModel extends RetrofitBaseModel {

    public void allClub(List_TListener<Club> listener){
        Call<List<Club>> call = service.allclub();
        callenqueue_list(call,listener);
    }
    public void hotClub(List_TListener<Club> listener){
        Call<List<Club>> call = service.hotclub();
        callenqueue_list(call,listener);
    }
    public void distanceClub(List_TListener<Club> listener){
        Call<List<Club>> call = service.distanceclub();
        callenqueue_list(call,listener);
    }

    public void getClub(int cid,TListener<Club> listener){
        Call<Club> call = service.getClub(cid);
        callenqueue(call,listener);
    }

    //0已关注，1未关注
    public void isliked(int uid, int cid, TListener<Success> listener){
        Call<Success> call = service.isliked(cid,uid);
        callenqueue(call,listener);
    }

    public void curclubclass(int cid, List_TListener<ClubClass> list_tListener){
        Call<List<ClubClass>> call = service.curclubclass(cid);
        callenqueue_list(call,list_tListener);

    }

    public void curclubvideo(int cid, List_TListener<ClubVideo> list_tListener){
        Call<List<ClubVideo>> call = service.curclubvideo(cid);
        callenqueue_list(call,list_tListener);

    }

    public void likeclub(int cid,int uid,TListener<Success> listener){
        Call<Success> call = service.likeclub(cid,uid);
        callenqueue(call,listener);
    }
    public void unlikeclub(int cid,int uid,TListener<Success> listener){
        Call<Success> call = service.unlikeclub(cid,uid);
        callenqueue(call,listener);
    }


}
